Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some (but not all) docs for the Rust crate #696

Merged
merged 15 commits into from
Aug 13, 2024

Conversation

gadomski
Copy link
Contributor

@gadomski gadomski commented Aug 13, 2024

Includes:

  • A breaking cahnge to Table::from_arrow_and_geometry to make the argument order the same as Table::try_new
  • Removal of a leftover dbg! statement in src/array/coord/separated/array.rs
  • Moved two single-file mod-name/mod.rs modules up a level (table.rs and chunked_array.rs)
  • Some README tweaks, including adding badges
  • #![deny(missing_docs)] to lib.rs, and then #![allow(missing_docs)] on the "deep" modules (e.g. algorithm, array)
  • Docs to the rest of the modules, with examples almost always

NB I've updated #689 with a checklist to track progress on the "deep" modules

@@ -155,6 +155,7 @@ bench = false # TODO fix this benchmark
required-features = ["parquet_compression"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To see what this gets us, you can run:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features -F gdal/bindgen

That will get us feature flags in the output, which is how docs.rs presents stuff. E.g. on the io mod:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I've been wondering how to get the feature flag badges in the docs! That looks great!

Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing, thank you!

README.md Outdated Show resolved Hide resolved
js/README.md Outdated Show resolved Hide resolved
python/README.md Outdated Show resolved Hide resolved
src/array/metadata.rs Show resolved Hide resolved
src/datatypes.rs Outdated Show resolved Hide resolved
src/trait_.rs Outdated Show resolved Hide resolved
src/trait_.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@kylebarron
Copy link
Member

As a general note, as I was adding #![deny(missing_docs)] to pyo3-arrow yesterday, I was also thinking it's a good opportunity to rethink what should actually exist in the public API. So feel free to also take a critical lens on "should this be exported through the public API" if there's something you don't want to write documentation for

@kylebarron kylebarron merged commit 9eaf839 into geoarrow:main Aug 13, 2024
22 checks passed
@kylebarron
Copy link
Member

Thanks!

@gadomski gadomski deleted the issues/689-docs branch August 13, 2024 22:09
kylebarron pushed a commit that referenced this pull request Aug 23, 2024
If it's ok, I'd be stoked to get a v0.3.0 release of **geoarrow** — some
of my **stac-geoparquet** is getting close to being release-able.

Here's a checklist of things that have been mentioned as part of a v0.3
(including
#628 (comment)
and https://github.com/geoarrow/geoarrow-rs/milestone/3):

- #660 is done ✅ 
- Some (but not all) of the doc updates are done in
#696, and I've got a
tracking issue for the rest in
#689
- "Broader support for 3d geometries" isn't done as far as I know, but I
haven't really been touching that at all yet
- #539 is a Python thing,
not a Rust crate thing

As a part of this release PR I've updated our deps when possible (`sqlx`
will require code change to support an update so I haven't done that
one).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants